package cn.sirun.com.fca.account.loader;

import com.tencent.cloud.iov.kernel.model.BaseResponse;

import cn.sirun.com.fca.account.model.base.CarInfoDetailRequest;
import cn.sirun.com.fca.account.model.base.CarInfoDetailResponse;

import cn.sirun.com.fca.account.model.bind.SubmitCarAuthenticationRequest;
import cn.sirun.com.fca.account.model.bind.SubmitCarAuthenticationResponse;
import cn.sirun.com.fca.account.model.bind.SubmitPersonalInfoRequest;
import cn.sirun.com.fca.account.model.bind.SubmitPersonalInfoResponse;
import cn.sirun.com.fca.account.repo.bind.BindRepository;

import io.reactivex.Observable;
import io.reactivex.schedulers.Schedulers;

public class CarBelongtoAuthLoader extends AccountFlowLoader {

    public Observable<BaseResponse<CarInfoDetailResponse>> getCarInfoDetail(CarInfoDetailRequest request) {
        return BindRepository.getInstance().getCarInfoDetail(request)
                .subscribeOn(Schedulers.io());
    }

    public Observable<BaseResponse<SubmitPersonalInfoResponse>> submitPersonalInfo(SubmitPersonalInfoRequest request) {
        return BindRepository.getInstance().submitPersonInfo(request)
                .subscribeOn(Schedulers.io());
    }

    public Observable<BaseResponse<SubmitCarAuthenticationResponse>> submitCarAuthentication(SubmitCarAuthenticationRequest request) {
        return BindRepository.getInstance().submitCarAuthentication(request)
                .subscribeOn(Schedulers.io());
    }

}
